/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.ac.iie.ulss.monitor.mainserver;

import java.util.logging.Level;
import java.util.logging.Logger;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;

/**
 *
 * @author work
 */
public class MetricRefresher implements Runnable {

    static org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(MetricRefresher.class.getName());

    @Override
    public void run() {
        try {
            //FileInputStream fis = new FileInputStream("loadrate");
            FileReader reader = new FileReader("loadrate");
            BufferedReader bufedreader = new BufferedReader(reader);
            while (bufedreader.read() != -1) {
                String data = bufedreader.readLine();
                if (data == null) {
                }
            }
        } catch (Exception ex) {
            logger.error(ex, ex);
        }
        while (true) {
            try {
                Thread.sleep(5000);
            } catch (InterruptedException ex) {
            }
        }
    }
}
